// instrument_bbg.h - Bloomberg instruments
// Copyright (c) 2011 KALX, LLC. All rights reserved. No warranty made.
#include "xllpwflat.h"
#include "../fmsdatetime/calendar.h"
#include "../fmspwflat/cash_deposit.h"
#include "../fmspwflat/interest_rate_swap.h"

using namespace datetime;
using namespace instrument;
using namespace xll;

static AddInX xai_bbg_ticker(
	DocumentX(_T("BBG"))
	.Documentation(_T("Fixed income instrument indicative data from Bloomberg ticker. "))
);

INSTRUMENT_HANDLE(CASH.DEPOSIT, US00O_N, instrument::cash_deposit(1, UNIT_DAYS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0001W, instrument::cash_deposit(1, UNIT_WEEKS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0002W, instrument::cash_deposit(2, UNIT_WEEKS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0001M, instrument::cash_deposit(1, UNIT_MONTHS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0002M, instrument::cash_deposit(2, UNIT_MONTHS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0003M, instrument::cash_deposit(3, UNIT_MONTHS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0006M, instrument::cash_deposit(6, UNIT_MONTHS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(CASH.DEPOSIT, US0001Y, instrument::cash_deposit(1, UNIT_YEARS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))

//INSTRUMENT_HANDLE(FORWARD.RATE.AGREEMENT, ED, instrument::forward_rate_agreement(3, UNIT_MONTHS, DCB_ACTUAL_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))

INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW2, instrument::interest_rate_swap(2, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW3, instrument::interest_rate_swap(3, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW4, instrument::interest_rate_swap(4, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW5, instrument::interest_rate_swap(5, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW6, instrument::interest_rate_swap(6, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW7, instrument::interest_rate_swap(7, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW8, instrument::interest_rate_swap(8, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW9, instrument::interest_rate_swap(9, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW10, instrument::interest_rate_swap(10, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW11, instrument::interest_rate_swap(11, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW12, instrument::interest_rate_swap(12, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW13, instrument::interest_rate_swap(13, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW14, instrument::interest_rate_swap(14, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW15, instrument::interest_rate_swap(15, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW16, instrument::interest_rate_swap(16, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW17, instrument::interest_rate_swap(17, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW18, instrument::interest_rate_swap(18, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW19, instrument::interest_rate_swap(19, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW20, instrument::interest_rate_swap(20, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW21, instrument::interest_rate_swap(21, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW22, instrument::interest_rate_swap(22, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW23, instrument::interest_rate_swap(23, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW24, instrument::interest_rate_swap(24, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW25, instrument::interest_rate_swap(25, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW26, instrument::interest_rate_swap(26, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW27, instrument::interest_rate_swap(27, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW28, instrument::interest_rate_swap(28, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW29, instrument::interest_rate_swap(29, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))
INSTRUMENT_HANDLE(INTEREST.RATE.SWAP, USSW30, instrument::interest_rate_swap(30, UNIT_YEARS, FREQ_SEMIANNUALLY, DCB_30U_360, ROLL_MODIFIED_FOLLOWING, CALENDAR_NYB))

